package com.ryskoo.common.hclconstant;

/**
 * 积分类型
 *
 * @author BeHappy
 */
public enum IntegralTypeEnum {
	
    ORDER_PRESENTED(1, "下单赠送"),
    ORDER_USE(2, "下单消费"),
    CANCEL_ORDER_RETURN(3, "订单取消退还"),
	APPRAISE_PRESENTED(4, "订单评价赠送");
	
    private int value;
    private String name;

    IntegralTypeEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getNameByValue(int value) {
        for (IntegralTypeEnum o : IntegralTypeEnum.values()) {
            if (o.getValue() == value) {
                return o.getName();
            }
        }
        return "";
    }
}
